load("@rules_rust//rust:defs.bzl", "rust_library")
load("//bazel:prost.bzl", "protobuf_generator")

package(default_visibility = ["//visibility:public"])

DEPENDENCIES = [
    # Keep sorted.
    "//rs/utils/rustfmt",
    "@crate_index//:prost-build",
]

MACRO_DEPENDENCIES = []

ALIASES = {}

rust_library(
    name = "lib",
    srcs = glob(["src/**/*.rs"]),
    aliases = ALIASES,
    crate_name = "ic_sns_root_protobuf_generator",
    proc_macro_deps = MACRO_DEPENDENCIES,
    version = "0.9.0",
    deps = DEPENDENCIES,
)

protobuf_generator(
    name = "protobuf_generator",
    srcs = ["src/main.rs"],
    manifest_dir = "rs/sns/root/protobuf_generator/",
    deps = [":lib"],
)
